﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Nuzzle.Protocol.Types.Game.Character.Alignment
{
    public class ActorExtendedAlignmentInformations : ActorAlignmentInformations
    {
        public short Honor { get; set; }
        public short HonorGradeFloor { get; set; }
        public short HonorNextGradeFloor { get; set; }
        public bool PvpEnabled { get; set; }

        public ActorExtendedAlignmentInformations(short honor, short honorGradeFloor, short honorNextGradeFloor,
            bool pvpEnabled, byte alignmentSide, byte alignmentValue, byte alignmentGrade,
            short deshonor, int characterPower)
            : base(alignmentSide, alignmentValue, alignmentGrade, deshonor, characterPower)
        {
            this.Honor = honor;
            this.HonorGradeFloor = honorGradeFloor;
            this.HonorNextGradeFloor = honorNextGradeFloor;
            this.PvpEnabled = pvpEnabled;
        }

        public void Serialize(NetworkMessage message)
        {
            base.Serialize(message);
            message.WriterBuffer.writeShort(this.Honor);
            message.WriterBuffer.writeShort(this.HonorGradeFloor);
            message.WriterBuffer.writeShort(this.HonorNextGradeFloor);
            message.WriterBuffer.writeBoolean(this.PvpEnabled);
        }
    }
}
